<div style="text-align:center;">
    <table style="margin-left:auto;margin-right:auto;">
        <tr>
            <td style="background-color: #CCCCCC; padding: 10px;">
                <div class="wrap1">
                    <div class="wrap2">
                        <div class="wrap3">
                            <div class="wrap4">
                                <div class="wrap5">
                                {if !$bUseLightbox}
								{img max_width="$iImgViewSize" src="`$sActualImage`" src_def="design/pic/noimage_120.jpg" alt="" id="mainimage"}
                                {else}
                                {if $iWidth > $iImgViewSize || $iHeight > $iImgViewSize}
                				{img onmouseover="showInfo5('`$sEnlargeImage`', '', '');" onmouseout="return nd();" rel="lytebox" onclick="startLytebox('mainimage');" max_width="`$iImgViewSize`" src="`$sActualImage`" src_def="design/pic/noimage_120.jpg" alt="" id="mainimage"}
                				{else}
                				{img max_width="$iImgViewSize" src="`$sActualImage`" src_def="design/pic/noimage_120.jpg" alt=""}
                				{/if}
                				{/if}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
    </table>
    <span style="padding-left:10px;">
    {if isStaff()}
    	<a class="link_action" href="{url link='public.gallery.main' delete=$aItem.id}" onclick="sure('');">[ {language text='delete'} ]</a>
    	{if $aItem.feature == 1}<a class="link_action" href="{url link='current' removefeature=$aItem.id}">[ {language text="unmake_featured"} ]</a>{else}<a class="link_action" href="{url link='current' makefeature=$aItem.id}">[ {language text="make_featured_763"} ]</a>{/if}	
    {/if}
        <a class="link_action" href="{if $bLoggedIn}{$sUrl}#comment{else}{url link='public.login'}{/if}">[ {language text="leave_a_comment"} ]</a>{if $bCanRate}&nbsp;<a class="link_action" href="{url link='public.gallery.rate' rateid=$aItem.id}">[ {language text="rate_this_pic"} ]</a>{/if}
    </span>
    <br /><br />
    <div style="text-align:center;font-size:9pt;">
        {if $iPrevId}<a class="link_action" href="{url link='public.gallery.view' id=$iPrevId field=$sField}"> &lt;&lt; {language text="prev_pic"}</a>{/if}
        {if $iPrevId && $iNextId}|{/if}
        {if $iNextId}<a class="link_action" href="{url link='public.gallery.view' id=$iNextId field=$sField}">{language text="next_pic"} &gt;&gt;  </a>{/if}
    </div>
</div>
<br />

{bookmarks}<br />

<table style="width: 100%;" cellpadding="4" cellspacing="0">
    <tr>
        <td class="border2">
            <table style="width: 100%;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
                    <td class="block_header">{if !$aItem.text}{language text='Mod_Site.untitled'}{else}{$aItem.text|process_code}{/if}</td>
                </tr>
            </table>
            <table style="width:100%;" cellpadding="0" cellspacing="0">
                <tr>
                    <td style="vertical-align:middle;font-size:8pt;width:60%;" class="color">
                        <div style="padding-left:8px;">
                            <div style="padding-top:4px;"><b>{language text="date"}</b>: {$aItem.time|date_format:$sMonthDateFormat}</div>
                            <div style="padding-top:4px;"><b>{language text="views"}</b>: {$aItem.view}</div>
                            <div style="padding-top:4px;"><b>{language text="comments_67"}</b>: {$aItem.comment}</div>
                            <div style="padding-top:4px;"><b>{language text="rating"}</b>: {$aItem.rating}</div>
                            <div style="padding-top:4px;"><b>{language text="resolution"}</b>: {$iWidth} x {$iHeight}</div>
                            <div style="padding-top:4px;"><b>{language text="image_size"}</b>: {$iFileSize|filesize}</div>
                            {if $aItem.cname}<div style="padding-top:4px;"><b>{language text="category_145"}</b>: {$aItem.cname|ucwords}</div>{/if}
                            <div style="padding-top:4px;"><b>{language text="image_url_location"}</b>:</div>                            
                        </div>
                    </td>
                    <td style="width:40%;text-align:center;vertical-align:middle;">
                        <div style="padding-bottom:5px;">
                            <a href="{url link='public.user' name=$aItem.user}">{$aItem.user}</a>
                        </div>
                        <a href="{url link='public.user' name=$aItem.user}">
                            {Account::Avatar sUser=$aItem.user iSize=75 class="pic1" onmouseover="showInfo5('`$aItem.user`', '', '');this.className='pic2';" onmouseout="this.className='pic1';return nd();"}
                        </a>
                    </td>
                </tr>
            </table>
            <div style="padding-top:4px;padding-left:10px;">
                <input type="text" size="70" name="url" value="{$sActualImage}" />
            </div>
        </td>
    </tr>
</table>

		<br />
		<a name="comment"></a>
		<table style="width: 100%;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0">
            <tr>
            <td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
            <td class="block_header">{language text="members_comments"}</td>
            </tr>
        </table>

        <table style="width:100%;" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td style="width:2%;"></td>
                <td style="width:98%;font-size:8pt;vertical-align:middle;font-size:8pt;" class="color">
                <br />
                {Comments::AddForm type='gallery' alert_id=$aItem.user_id}
                <br />
             	<a name="comment"></a>
             	<div id="new_comment" style="display:none;"></div>
                {Comments::List type='gallery' totalCount=$aItem.comment}
                </td>
            </tr>
        </table>